home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
WarriorsProgress.sit
/
Warrior’s Progress
/
source code
/
Source
/
Libraries
/
Debug
/
DebugMessage.cp
< prev
next >
Wrap
Text File
|
1997-06-28
|
1KB
|
69 lines
// DebugMessage.cp
#ifndef DebugMessage_h
#include "DebugMessage.h"
#endif
#ifndef Numeral_h
#include "Numeral.h"
#endif
#ifndef ConstData_h
#include "ConstData.h"
#endif
uint8 DebugMessage::message[ maxuint8 + 1 ];
DebugMessage::DebugMessage()
{
message[0] = 0;
}
DebugMessage::DebugMessage( ConstStr255Param string )
{
message[0] = 0;
*this += string;
}
void DebugMessage::operator+=( ConstStr255Param string )
{
for ( uint32 i = 1; i <= string[0] && message[0] < maxuint8; i++ )
message[ ++message[0] ] = string[ i ];
}
void DebugMessage::operator+=( ConstData string )
{
for ( uint32 i = 0; i < string.Length() && message[0] < maxuint8; i++ )
message[ ++message[0] ] = string[ i ];
}
void DebugMessage::operator+=( uint64 n )
{
*this += Numeral( n );
}
void DebugMessage::operator+=( int64 n )
{
*this += Numeral( n );
}
void DebugMessage::operator+=( uint32 n )
{
*this += Numeral( n );
}
void DebugMessage::operator+=( int32 n )
{
*this += Numeral( n );
}
void DebugMessage::operator+=( void *p )
{
Numeral n( uint32(p), 16 );
n.PadTo( 8 );
*this += n;
}
void DebugMessage::AddGo()
{
*this += "\p;g";
}